package com.itheima.service;

import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.Role;
import com.itheima.pojo.User;

import java.util.List;

public interface RoleService {

    //分页查询
    PageResult pageQuery(QueryPageBean queryPageBean);

    //按角色Id查询
    Role findById(Integer id);

    //根据角色Id查询权限Id
    List<Integer> findPermissionIdByRoleId(Integer id);

    //根据角色Id查询菜单Id
    List<Integer> findMenuIdByRoleId(Integer id);

    //新增---------
    void add(Role role, Integer[] permissions,Integer[] menus);

    //删除
    void delete(Integer id);

    //修改
    void edit(Role role, Integer[] permissions, Integer[] menus);
}
